package cc.comac.mom.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import cc.comac.mom.api.EquipRegularCheckWorkOrderService;
import cc.comac.mom.bean.EquipRegularCheckWorkOrder;
import cc.comac.mom.bean.EquipRegularCheckWorkOrderBean;
import cc.comac.mom.bean.ResultDev;
import cc.comac.mom.datahandlers.entity.EquipRegularCheckWorkOrderDataHandler;
import cc.comac.mom.util.ResultBean;

@Service
@RestController
public class EquipRegularCheckWorkOrderServiceImpl implements EquipRegularCheckWorkOrderService{

	@Autowired
	private EquipRegularCheckWorkOrderDataHandler equipRegularCheckWorkOrderDataHandler;
	@Override
	public ResultBean insertBatch(List<EquipRegularCheckWorkOrder> list) {
		// TODO Auto-generated method stub
		return equipRegularCheckWorkOrderDataHandler.insertBatch(list);
	}

	@Override
	public ResultBean selectByFields(@RequestBody EquipRegularCheckWorkOrderBean obj) {
		ResultBean resultBean = new ResultBean(true);
		ResultDev selectByFields = equipRegularCheckWorkOrderDataHandler.selectByFields(obj);
		resultBean.setObject(selectByFields);
		return resultBean;
	}

	@Override
	public ResultBean adjustDate(@RequestBody EquipRegularCheckWorkOrder obj) {
		// TODO Auto-generated method stub
		return equipRegularCheckWorkOrderDataHandler.adjustDate(obj);
	}

	@Override
	public ResultBean updateExecuteTime(@RequestBody EquipRegularCheckWorkOrder obj) {
		// TODO Auto-generated method stub
		return equipRegularCheckWorkOrderDataHandler.updateExecuteTime(obj);
	}

	@Override
	public ResultBean planStartExecute(@RequestBody EquipRegularCheckWorkOrder obj) {
		// TODO Auto-generated method stub
		return equipRegularCheckWorkOrderDataHandler.planStartExecute(obj);
	}

	@Override
	public ResultBean deleteBatch(@RequestBody List<Long> ids) {
		// TODO Auto-generated method stub
		return equipRegularCheckWorkOrderDataHandler.deleteBatch(ids);
	}

}
